package com.zhang.rabbitmq.component;

import cn.hutool.json.JSONObject;
import com.zhang.rabbitmq.config.RabbitMQConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: zhang
 * @Date: 2020/8/18 9:41
 * @Description:
 * @Version: 1.0
 */
@Slf4j
@Component
public class Consumer {

    @RabbitListener(queues = RabbitMQConfig.QUEUE_NAME)
    public void consumeMessage(String message) {
        log.info("consume message {}", message);
    }
}
